package com.wing.productionPlan.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wing.productionPlan.model.entity.ProductionProcessDevice;
import com.wing.productionPlan.model.request.ProductionProcessDeviceForm;
import com.wing.productionPlan.model.response.ProductionProcessDeviceVO;

import java.util.List;
import java.util.Map;

/**
 * 生产工序设备表-Service
 *
 * @author
 */
public interface ProductionProcessDeviceService extends IService<ProductionProcessDevice> {

    /**
     * 添加
     *
     * @param productionProcessDeviceForm
     * @return
     */
    int add(ProductionProcessDeviceForm productionProcessDeviceForm);

    /**
     * 列表-app
     *
     * @param params
     * @return
     */
    List<ProductionProcessDeviceVO> list4app(Map<String, Object> params);

    /**
     * 分页list-app
     *
     * @param page
     * @param params
     * @return
     */
    Page<ProductionProcessDeviceVO> pageList4app(Page page, Map<String, Object> params);

    /**
     * 详情-app
     *
     * @param id
     * @return
     */
    ProductionProcessDeviceVO get4appById(Long id);

    /**
     * 查询排产设备
     *
     * @param processId
     * @param deviceModel
     * @param deviceName
     * @return
     */
    Page<ProductionProcessDeviceVO> getProductionDeviceByProcessId(Page page, Long processId, String code, String deviceModel, String deviceName);

    /**
     * 查询计划排产明细工序的设备
     *
     * @param processId
     * @return
     */
    List<ProductionProcessDeviceVO> getProcessDeviceByProcessId(Long productionPlanId, Long productionPlanRecordId, Long processId);

    /**
     * 查询工序已排产数量
     *
     * @param processId
     * @param productionPlanId
     * @return
     */
    Integer getSumProductionQuantity(Long processId, Long productionPlanId);
}
